package com.pllandxzx.mapper;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.pll.pojo.Merchant;
import com.pllandxzx.bean.CheckBean;
import com.pllandxzx.bean.MerchantBean;
import com.pllandxzx.vo.MerchantVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @ClassName：MerchantMapper
 * @Author: 阿⭐
 * @Date: 2025/6/12 11:48
 * @Description: TODO
 */
@Mapper
public interface MerchantMapper extends BaseMapper<Merchant> {

    Page<MerchantBean> getMerchantList(Page<MerchantVo> page,@Param("merAddress") String merAddress,@Param("license") String license,@Param("certification") String certification,@Param("merName") String merName,@Param("merPhone") String merPhone);

    MerchantBean getMerchantDetail(@Param("merId") long id);

    MerchantBean getMerchantComments(@Param("merId") long id);

    Integer resetMerchantPassword(@Param("merId") int id);

    Integer updateMerchantStatus(@Param("merId")int id, @Param("status") String status);

    Page<CheckBean> getCheckList(Page<MerchantVo> page, @Param("merPhone") String merPhone, @Param("checkResult") String checkResult);

    Integer auditMerchant(@Param("checkId") long id, @Param("checkResult") String checkResult, @Param("checkNote") String checkNote, @Param("checkAdminId") long checkAdminId);

    int getMerchantIdByCheckId(@Param("checkId") long id);

    Integer updateMerchantCertification(@Param("merId")int merchantId,@Param("certification")int certification);
}
